/*
 * Copyright (c) 2016,重庆阿莫比科技有限公司,All Rights Reserved.
 */
package com.wowocai.btchina.entity;

import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.wowocai.btchina.enums.ApiResultEnums;

/**
 * <br/>
 * Date: 2016年12月29日 上午10:25:37 <br/>
 * 
 * @Author 刘建成
 * @Version
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ResponseResultEntity implements Serializable {

    private boolean success;

    private String msg;

    private int code;

    private Object body = null;

    /**
     * serialVersionUID:TODO<br/>
     */
    private static final long serialVersionUID = -5481864884066423184L;

    /**
     * Creates a new instance of ResponseResult.
     */
    public ResponseResultEntity() {
        success = ApiResultEnums.SUCCESS.isSuccess();
        msg = ApiResultEnums.SUCCESS.getMsg();
        code = ApiResultEnums.SUCCESS.getCode();
    }

    public ResponseResultEntity(ApiResultEnums result) {
        success = result.isSuccess();
        msg = result.getMsg();
        code = result.getCode();
    }

    /**
     * success.
     * 
     * @return the success
     */

    public boolean getSuccess() {
        return success;
    }

    /**
     * success.
     * 
     * @param success the success to set
     */

    public void setSuccess(boolean success) {
        this.success = success;
    }

    /**
     * msg.
     * 
     * @return the msg
     */

    public String getMsg() {
        return msg;
    }

    /**
     * msg.
     * 
     * @param msg the msg to set
     */

    public void setMsg(String msg) {
        this.msg = msg;
    }

    /**
     * code.
     * 
     * @return the code
     */

    public int getCode() {
        return code;
    }

    /**
     * code.
     * 
     * @param code the code to set
     */

    public void setCode(int code) {
        this.code = code;
    }

    /**
     * body.
     * 
     * @return the body
     */

    public Object getBody() {
        return body;
    }

    /**
     * body.
     * 
     * @param body the body to set
     */

    public void setBody(Object body) {
        this.body = body;
    }

}
